package com.xinqi.modules.sys.role.convert;

import com.xinqi.common.mapstruct.CommonConvertConfig;
import com.xinqi.modules.sys.role.domain.UserRoleEntity;
import com.xinqi.modules.sys.role.dto.req.UserRoleCreateDTO;
import com.xinqi.modules.sys.role.dto.req.UserRoleUpdateDTO;
import com.xinqi.modules.sys.role.dto.rsp.UserRoleResultDTO;
import org.mapstruct.Mapper;
import org.mapstruct.MappingTarget;

/**
 * 系统用户角色转换
 *
 * @author: linkai
 * @date: 2023/04/01
 */
@Mapper(config = CommonConvertConfig.class)
public abstract class UserRoleConvert {
    public abstract UserRoleEntity create(UserRoleCreateDTO s);

    public abstract UserRoleEntity update(UserRoleUpdateDTO s, @MappingTarget UserRoleEntity t);

    public abstract UserRoleEntity update(UserRoleUpdateDTO s);

    public abstract UserRoleResultDTO convert(UserRoleEntity s);
}
